<script setup lang="ts">
import {useRouter} from 'vue-router'

let $router = useRouter();
// 点击路由到首页
const goHome = () => {
  $router.push('/home')
}
</script>

<template>
  <div class="top">
    <div class="content">
      <div class="left" @click="goHome">
        <img src="@/assets/images/logo.png" alt="">
        <p>尚医通，预约挂号统一平台</p>
      </div>
      <div class="right">
        <p class="help">帮助中心</p>
        <p class="login">登录/注册</p>
      </div>
    </div>
  </div>
</template>

<style scoped lang="scss">
.top {
  position: fixed; // 固定定位
  z-index: 999; // 层级最高
  width: 100%;
  height: 70px;
  background: #fff;
  display: flex;
  justify-content: center; // 主轴居中

  .content {
    width: 1200px;
    height: 70px;
    background: white;
    display: flex;
    justify-content: space-between; // 主轴一左一右
    .left {
      display: flex;
      justify-content: center;
      align-items: center; // 侧轴居中 竖着
      cursor: pointer;

      img {
        width: 50px;
        height: 50px;
        margin-right: 10px;
      }

      p {
        font-size: 20px;
        color: #55a6fe;
      }
    }

    .right {
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: 14px;
      color: cornflowerblue;
      .help {
        margin-right: 10px;
      }
    }
  }
}
</style>
